package com.niit.view;

import java.sql.SQLException;
import java.util.List;
import java.util.Scanner;

import com.niit.dao.MenuDao;
import com.niit.pojo.Menu;

public class MeneView {
	public void showMainMenu(Scanner scanner,List<Integer> roleIds,String userName) throws SQLException {
		System.out.println("************************欢迎"+userName+"来到学生管理系统*******************************");
		MenuDao menuDao = new MenuDao();
		List<Menu> listMenuByRole = menuDao.listMenuByRole(roleIds);
		for(Menu menu :listMenuByRole ) {
			System.out.println(menu.getMenuId()+"."+menu.getMenuName());
			
		}
		System.out.println("请输入你要进行的操作：");
		String nextLine = scanner.nextLine();
			switch (nextLine) {
			case "1":
//				根据用户的选择进入不同的功能模块
				break;
			case "2":
				
				break;

			default:
				System.out.println("输入错误请重新输入");
				break;
		}
		
	}

}
